package service.impl;

import java.util.List;

import dao.DaoFactory;
import dao.ShopDao;
import pojo.Book;
import pojo.Order;
import service.ShopManager;

public class ShopManagerImpl implements ShopManager {
	private ShopDao shopDao;
	
	
	public ShopManagerImpl() {
		super();
		shopDao = DaoFactory.getInstance();
	}

	@Override
	public List<Book> loadAllBooks() {
		List<Book> books = shopDao.loadAllBooks();
		return books;
	}

	@Override
	public List<Book> loadAllOrders() {
		return null;
	}

	@Override
	public int findUser(String name) {
		return 0;
	}

	@Override
	public Book loadBook(String bid) {
		Book b = shopDao.loadBook(bid);
		return b;
	}

	@Override
	public int addOrder(Order o) {
		int m = shopDao.addOrder(o);
		return m;
	}

}
